package thread.synchronize_dirty_data;

/**
 * Created by mHandler on 2018/5/29 0029.
 * Description:
 */
public class ThreadA extends Thread {

    private PublicVar publicVar;
    public ThreadA(PublicVar publicVar){
        super();
        this.publicVar = publicVar;
    }
    @Override
    public void run() {
        super.run();
        publicVar.setValue("b","bb");
    }

    public static void main(String[] args) {
        try {
            PublicVar publicVar = new PublicVar();
            ThreadA threadA = new ThreadA(publicVar);
            threadA.start();
            Thread.sleep(200);
            publicVar.getValue();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
